﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Speech.Synthesis;

namespace licensePlateTool
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        Form2 form2 = new Form2();

        private void button1_Click(object sender, EventArgs e)
        {
            form2.Show();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            
        }

        private void button3_Click(object sender, EventArgs e)
        {
            string recognizedText = "这里是OCR识别出的文本";

            // 使用TTS播报文本
            using (SpeechSynthesizer synthesizer = new SpeechSynthesizer())
            {
                var aa = synthesizer.GetInstalledVoices();
                synthesizer.SelectVoice("Microsoft Huihui Desktop");
                synthesizer.Speak(recognizedText);
            }
        }
    }
}
